A gait of a legged robot is typically viewed as a cyclic pattern of leg movements that produces locomotion through a sequence of foot contacts with a surface. The legs provide support for the body of the legged robot while the forces resulting from surface contact propel the legged robot. Gaits can differ in a variety of ways, and different gaits produce different styles of locomotion. Selection of an appropriate gait when the legged robot is in a particular state can be challenging, as some gaits might result in the robot becoming unstable or exhibiting undesirable movement.